Make redis the first container of its pod - #28
Merged
Conversation
The redis container is now first and the exporter sidecar second, so kubectl logs/exec target redis by default. Adopted from shopsys/deployment#74; documented as deviation 17. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Swaps the container order in the Redis Deployment so the redis container is listed first (and thus becomes the default target for kubectl logs / kubectl exec), matching operational expectations and aligning with the referenced upstream change.
Changes:
- Reordered
redis/redis-exportercontainers in theshopsys-infraRedis Deployment template (with an explanatory comment). - Updated helm-unittest assertions to match the new container ordering.
- Regenerated golden snapshots to reflect the updated rendered manifest ordering and documented the deviation.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| charts/shopsys-infra/templates/deployment-redis.yaml | Reorders Redis containers (redis first, exporter second) and adds a template comment explaining why. |
| charts/shopsys-infra/tests/infra_test.yaml | Updates test assertions to reflect the new container order. |
| docs/migrating-from-shopsys-deployment.md | Documents the container-order change as a new intentional deviation (#17). |
| tests/golden/scenarios/basic-production/expected/continuous.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/basic-production/expected/first-deploy-with-demo-data.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/basic-production/expected/first-deploy.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/development-single-domain/expected/continuous.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/development-single-domain/expected/first-deploy-with-demo-data.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/development-single-domain/expected/first-deploy.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/development-with-cloudflare/expected/continuous.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/development-with-cloudflare/expected/first-deploy-with-demo-data.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/development-with-cloudflare/expected/first-deploy.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/escaping-env/expected/continuous.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/escaping-env/expected/first-deploy-with-demo-data.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/escaping-env/expected/first-deploy.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/production-with-cloudflare/expected/continuous.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/production-with-cloudflare/expected/first-deploy-with-demo-data.yaml | Golden snapshot updated for reordered Redis containers. |
| tests/golden/scenarios/production-with-cloudflare/expected/first-deploy.yaml | Golden snapshot updated for reordered Redis containers. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Swaps the container order of the redis pod: the
rediscontainer is now first and theredis-exportersidecar second.Why
kubectl logs/kubectl exec deployment/redistarget the first container by default —until now that was the exporter, which is confusing during operations. Port of the upstream
change shopsys/deployment#74 into the chart.
Changes
charts/shopsys-infra/templates/deployment-redis.yaml— container order swap (with anexplanatory template comment)
charts/shopsys-infra/tests/infra_test.yaml— assertions follow the new orderdocs/migrating-from-shopsys-deployment.mdNo functional change to either container's spec — image, probes, resources and mounts are
identical, only the order differs.
🤖 Generated with Claude Code